#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <set>

using namespace std;

int getMax(int a[], int size)
{
    if (size == 0) return 0;

    int pre, maxCount = 0, count;
    for (int i = 0; i < size; ) {
	pre = a[i];
	count = 1;
	while (++i < size && a[i] == pre) {
	    count ++;    
	}	
	if (count > maxCount) 
	    maxCount = count;
    }
    return maxCount;
}

int main(int argc, char **argv)
{

    cout << "-----------------Test 1--------------------" << endl;
    int test[] = {3, 4, 4, 4, 2, 2, 3, 4,4,4,4,4,4,4,4,4};
    cout << "Max count is " << getMax(test, sizeof(test)/sizeof(int)) << endl; 


    cout << "-----------------Test 2--------------------" << endl;


    cout << "-----------------Test 3--------------------" << endl;


    cout << "-----------------Test 4--------------------" << endl;


    cout << "-----------------Test 5--------------------" << endl;



}
